import { Meta, StoryObj } from "@storybook/react";
import { IotAlarmTip } from "modules/iot";
import { useState } from "react";
import axiosDefault from "utils/defaultAxios";
const meta: Meta<typeof IotAlarmTip> = {
  title: "Component/AlarmTip",
  component: IotAlarmTip,
  tags: ["autodocs"],
  parameters: {
    layout: "padded", // fullscreen//centered//padded
  },

  decorators: [
    (Story) => {
      const [isAlarm, setIsAlarm] = useState(true);
      const [isAlarmSounding, setIsAlarmSounding] = useState(true);

      // 离线
      const [isOffline, setIsOffline] = useState(true);
      const [isOfflineSounding, setIsOfflineSounding] = useState(true);

      return (
        <div className="gap-5 flex">
          <Story
            args={{
              axios: axiosDefault,
            }}
          />
        </div>
      );
    },
  ],
};

export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
  name: "温度报警",
  args: {
    axios: axiosDefault,
  },
};
